package model.Actions;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import commons.Entities.LegenCharacterThin;

import view.ViewFunctions;
import DB.Connection.DBConnectionManager;

public class getUserFavoritesAction implements Runnable {

	private static final Log logger = LogFactory.getLog(addCharacterCommentAction.class);

	private Integer userID;

	public getUserFavoritesAction(Integer userID) {
		this.userID = userID;
	}

	@Override
	public void run() {
		logger.info("getUserFavoritesAction starting...");

		List<LegenCharacterThin> favorites = DBConnectionManager.get().getUserFavorites(userID);
		ViewFunctions.get().updateGUIUserFavorites(favorites);

		logger.info("getUserFavoritesAction ended.");
	}
}